<%@ page import="pers.gs.Entity.Student" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生信息</title>
</head>
<body>
    <table>
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>更多操作</th>
        </tr>
        <%
            //获取request域中的数据
            List<Student> studentList = (List<Student>) request.getAttribute("studentList");
            //遍历studentList打印出每一行学生信息
            for (Student student:studentList){
        %>
        <tr>
            <td><%= student.getSno()%></td>
            <td><%= student.getName()%></td>
            <td>
                <a href="DeleteStudentServlet?usno=<%=student.getSno()%>">删除</a>
                &nbsp;
                <a href="QueryStudentBySnoServlet?usno=<%=student.getSno()%>">更多</a>
            </td>
        </tr>
        <%
            }
        %>
    </table>
    <a href="add.jsp">新增学生信息</a>
</body>
</html>
